#region Copyright RenGuiYou. All rights reserved.

//=====================================================
// PandoraFrameWork
// Author:      RenGuiyou
// Feedback: 	mailto:750539605@qq.com
//=====================================================

#endregion

using UnityEngine;

namespace Pandora.Console
{
    public class SystemInfoWindow : ScrollWindowBase
    {
        protected override void OnDrawScrollableWindow()
        {
            GUILayout.Label("<b>系统信息</b>");
            GUILayout.BeginVertical("box");
            {
                DrawItem("设备uid:", SystemInfo.deviceUniqueIdentifier);
                DrawItem("设备名:", SystemInfo.deviceName);
                DrawItem("设备型号:", SystemInfo.deviceType.ToString());
                DrawItem("设备模型:", SystemInfo.deviceModel);
                DrawItem("处理器类型:", SystemInfo.processorType);
                DrawItem("处理器数量:", SystemInfo.processorCount.ToString());
                DrawItem("处理器主频:", string.Format("{0} MHz", SystemInfo.processorFrequency));
                DrawItem("内存大小:", string.Format("{0} MB", SystemInfo.systemMemorySize));
//                    DrawItem("操作系统系列:", SystemInfo.operatingSystemFamily.ToString());
                DrawItem("操作系统:", SystemInfo.operatingSystem);
                DrawItem("支持音频:", SystemInfo.supportsAudio.ToString());
                DrawItem("支持定位:", SystemInfo.supportsLocationService.ToString());
                DrawItem("支持加速度:", SystemInfo.supportsAccelerometer.ToString());
                DrawItem("支持陀螺仪:", SystemInfo.supportsGyroscope.ToString());
                DrawItem("支持触摸震动:", SystemInfo.supportsVibration.ToString());
            }
            GUILayout.EndVertical();
        }

        //        SystemInfo.batteryStatus
        //            SystemInfo.batteryLevel
        //        private string GetBatteryLevelString(float batteryLevel)
        //        {
        //            if (batteryLevel < 0f)
        //            {
        //                return "Unavailable";
        //            }
        //
        //            return batteryLevel.ToString("P0");
        //        }
    }
}